Integrand size = 21, antiderivative size = 99 \[ \int \sqrt {a+\frac {b}{x}} \left (c+\frac {d}{x}\right )^2 \, dx=-\frac {c (b c+4 a d) \sqrt {a+\frac {b}{x}}}{a}-\frac {2 d^2 \left (a+\frac {b}{x}\right )^{3/2}}{3 b}+\frac {c^2 \left (a+\frac {b}{x}\right )^{3/2} x}{a}+\frac {c (b c+4 a d) \text {arctanh}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{\sqrt {a}} \]
[Out]
Time = 0.05 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {382, 91, 81, 52, 65, 214} \[ \int \sqrt {a+\frac {b}{x}} \left (c+\frac {d}{x}\right )^2 \, dx=\frac {c \text {arctanh}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right ) (4 a d+b c)}{\sqrt {a}}+\frac {c^2 x \left (a+\frac {b}{x}\right )^{3/2}}{a}-\frac {c \sqrt {a+\frac {b}{x}} (4 a d+b c)}{a}-\frac {2 d^2 \left (a+\frac {b}{x}\right )^{3/2}}{3 b} \]
[In]
[Out]
Rule 52
Rule 65
Rule 81
Rule 91
Rule 214
Rule 382
Rubi steps \begin{align*} \text {integral}& = -\text {Subst}\left (\int \frac {\sqrt {a+b x} (c+d x)^2}{x^2} \, dx,x,\frac {1}{x}\right ) \\ & = \frac {c^2 \left (a+\frac {b}{x}\right )^{3/2} x}{a}-\frac {\text {Subst}\left (\int \frac {\sqrt {a+b x} \left (\frac {1}{2} c (b c+4 a d)+a d^2 x\right )}{x} \, dx,x,\frac {1}{x}\right )}{a} \\ & = -\frac {2 d^2 \left (a+\frac {b}{x}\right )^{3/2}}{3 b}+\frac {c^2 \left (a+\frac {b}{x}\right )^{3/2} x}{a}-\frac {(c (b c+4 a d)) \text {Subst}\left (\int \frac {\sqrt {a+b x}}{x} \, dx,x,\frac {1}{x}\right )}{2 a} \\ & = -\frac {c (b c+4 a d) \sqrt {a+\frac {b}{x}}}{a}-\frac {2 d^2 \left (a+\frac {b}{x}\right )^{3/2}}{3 b}+\frac {c^2 \left (a+\frac {b}{x}\right )^{3/2} x}{a}-\frac {1}{2} (c (b c+4 a d)) \text {Subst}\left (\int \frac {1}{x \sqrt {a+b x}} \, dx,x,\frac {1}{x}\right ) \\ & = -\frac {c (b c+4 a d) \sqrt {a+\frac {b}{x}}}{a}-\frac {2 d^2 \left (a+\frac {b}{x}\right )^{3/2}}{3 b}+\frac {c^2 \left (a+\frac {b}{x}\right )^{3/2} x}{a}-\frac {(c (b c+4 a d)) \text {Subst}\left (\int \frac {1}{-\frac {a}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+\frac {b}{x}}\right )}{b} \\ & = -\frac {c (b c+4 a d) \sqrt {a+\frac {b}{x}}}{a}-\frac {2 d^2 \left (a+\frac {b}{x}\right )^{3/2}}{3 b}+\frac {c^2 \left (a+\frac {b}{x}\right )^{3/2} x}{a}+\frac {c (b c+4 a d) \tanh ^{-1}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{\sqrt {a}} \\ \end{align*}
Time = 0.28 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.85 \[ \int \sqrt {a+\frac {b}{x}} \left (c+\frac {d}{x}\right )^2 \, dx=\frac {\sqrt {a+\frac {b}{x}} \left (-2 a d^2 x+b \left (-2 d^2-12 c d x+3 c^2 x^2\right )\right )}{3 b x}+\frac {c (b c+4 a d) \text {arctanh}\left (\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {a}}\right )}{\sqrt {a}} \]
[In]
[Out]
Time = 0.08 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.16
method | result | size |
risch | \(-\frac {\left (-3 b \,c^{2} x^{2}+2 x a \,d^{2}+12 b c d x +2 b \,d^{2}\right ) \sqrt {\frac {a x +b}{x}}}{3 x b}+\frac {\left (4 a d +b c \right ) c \ln \left (\frac {\frac {b}{2}+a x}{\sqrt {a}}+\sqrt {a \,x^{2}+b x}\right ) \sqrt {\frac {a x +b}{x}}\, \sqrt {x \left (a x +b \right )}}{2 \sqrt {a}\, \left (a x +b \right )}\) | \(115\) |
default | \(\frac {\sqrt {\frac {a x +b}{x}}\, \left (24 a^{\frac {3}{2}} \sqrt {a \,x^{2}+b x}\, c d \,x^{3}+6 \sqrt {a}\, \sqrt {a \,x^{2}+b x}\, b \,c^{2} x^{3}+12 \ln \left (\frac {2 \sqrt {a \,x^{2}+b x}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) a b c d \,x^{3}+3 \ln \left (\frac {2 \sqrt {a \,x^{2}+b x}\, \sqrt {a}+2 a x +b}{2 \sqrt {a}}\right ) b^{2} c^{2} x^{3}-24 \sqrt {a}\, \left (a \,x^{2}+b x \right )^{\frac {3}{2}} c d x -4 d^{2} \left (a \,x^{2}+b x \right )^{\frac {3}{2}} \sqrt {a}\right )}{6 x^{2} \sqrt {x \left (a x +b \right )}\, \sqrt {a}\, b}\) | \(191\) |
[In]
[Out]
none
Time = 0.26 (sec) , antiderivative size = 208, normalized size of antiderivative = 2.10 \[ \int \sqrt {a+\frac {b}{x}} \left (c+\frac {d}{x}\right )^2 \, dx=\left [\frac {3 \, {\left (b^{2} c^{2} + 4 \, a b c d\right )} \sqrt {a} x \log \left (2 \, a x + 2 \, \sqrt {a} x \sqrt {\frac {a x + b}{x}} + b\right ) + 2 \, {\left (3 \, a b c^{2} x^{2} - 2 \, a b d^{2} - 2 \, {\left (6 \, a b c d + a^{2} d^{2}\right )} x\right )} \sqrt {\frac {a x + b}{x}}}{6 \, a b x}, -\frac {3 \, {\left (b^{2} c^{2} + 4 \, a b c d\right )} \sqrt {-a} x \arctan \left (\frac {\sqrt {-a} \sqrt {\frac {a x + b}{x}}}{a}\right ) - {\left (3 \, a b c^{2} x^{2} - 2 \, a b d^{2} - 2 \, {\left (6 \, a b c d + a^{2} d^{2}\right )} x\right )} \sqrt {\frac {a x + b}{x}}}{3 \, a b x}\right ] \]
[In]
[Out]
Time = 9.91 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.30 \[ \int \sqrt {a+\frac {b}{x}} \left (c+\frac {d}{x}\right )^2 \, dx=\sqrt {b} c^{2} \sqrt {x} \sqrt {\frac {a x}{b} + 1} - 2 c d \left (\begin {cases} \frac {2 a \operatorname {atan}{\left (\frac {\sqrt {a + \frac {b}{x}}}{\sqrt {- a}} \right )}}{\sqrt {- a}} + 2 \sqrt {a + \frac {b}{x}} & \text {for}\: b \neq 0 \\- \sqrt {a} \log {\left (x \right )} & \text {otherwise} \end {cases}\right ) + d^{2} \left (\begin {cases} - \frac {\sqrt {a}}{x} & \text {for}\: b = 0 \\- \frac {2 \left (a + \frac {b}{x}\right )^{\frac {3}{2}}}{3 b} & \text {otherwise} \end {cases}\right ) + \frac {b c^{2} \operatorname {asinh}{\left (\frac {\sqrt {a} \sqrt {x}}{\sqrt {b}} \right )}}{\sqrt {a}} \]
[In]
[Out]
none
Time = 0.29 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.27 \[ \int \sqrt {a+\frac {b}{x}} \left (c+\frac {d}{x}\right )^2 \, dx=\frac {1}{2} \, {\left (2 \, \sqrt {a + \frac {b}{x}} x - \frac {b \log \left (\frac {\sqrt {a + \frac {b}{x}} - \sqrt {a}}{\sqrt {a + \frac {b}{x}} + \sqrt {a}}\right )}{\sqrt {a}}\right )} c^{2} - 2 \, {\left (\sqrt {a} \log \left (\frac {\sqrt {a + \frac {b}{x}} - \sqrt {a}}{\sqrt {a + \frac {b}{x}} + \sqrt {a}}\right ) + 2 \, \sqrt {a + \frac {b}{x}}\right )} c d - \frac {2 \, {\left (a + \frac {b}{x}\right )}^{\frac {3}{2}} d^{2}}{3 \, b} \]
[In]
[Out]
Exception generated. \[ \int \sqrt {a+\frac {b}{x}} \left (c+\frac {d}{x}\right )^2 \, dx=\text {Exception raised: TypeError} \]
[In]
[Out]
Time = 6.07 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.00 \[ \int \sqrt {a+\frac {b}{x}} \left (c+\frac {d}{x}\right )^2 \, dx=\left (\frac {4\,a\,d^2-4\,b\,c\,d}{b}-\frac {4\,a\,d^2}{b}\right )\,\sqrt {a+\frac {b}{x}}+c^2\,x\,\sqrt {a+\frac {b}{x}}-\frac {2\,d^2\,{\left (a+\frac {b}{x}\right )}^{3/2}}{3\,b}-\frac {c\,\mathrm {atan}\left (\frac {\sqrt {a+\frac {b}{x}}\,1{}\mathrm {i}}{\sqrt {a}}\right )\,\left (4\,a\,d+b\,c\right )\,1{}\mathrm {i}}{\sqrt {a}} \]
[In]
[Out]